<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试数据生成</title>
<%@ include file="/pages/common/header.jsp" %>

<%-- 
	<link href="<%=request.getContextPath() %>/css/base.css" rel="stylesheet" type="text/css" /> 
	<!-- 圆角文本框 -->
	<link href="<%=request.getContextPath() %>/css/htc/htc.css" rel="stylesheet" type="text/css" /> 
 	<link rev="stylesheet" media="all" href="<%=request.getContextPath() %>/css/form_style.css" type="text/css" rel="stylesheet">
--%>
 <script type="text/javascript" src="<%=request.getContextPath() %>/js/datePicker/WdatePicker.js"></script>
 <script type="text/javascript" src="<%=request.getContextPath() %>/js/ligerUI/js/plugins/ligerCheckBoxList.js"></script>
<style type="text/css">
	.navbar{line-height:33px;height:33px;background:url('${pageContext.request.contextPath}/images/background/navbar.gif') repeat-x; width:100%; position:relative; margin-top:8px; margin-bottom:8px;}
		.navbar-l,.navbar-r{ width:2px;height:33px;background:url('${pageContext.request.contextPath}/images/background/navbar.gif') no-repeat; position:absolute; }
		.navbar-l{ left:0px; background-position:0px -33px;}
		.navbar-r{ right:0px;background-position:0px -66px;}
		.navbar-icon{ position:absolute; left:7px; top:6px;}
		.navbar img{ width:20px; height:20px;}
		.navbar-inner{ margin-left:30px;}
		.navbar a{ color:#3186C8;}
</style>
<script type="text/javascript">
$(function(){
	
	$("#btn1").bind('click',function(){
		var channelId = $("#channelId").val();
		if(channelId == "") return false;
		Koala.showLoading("正在处理数据中...");
 		Koala.ajax({
			url: "preprocess-GenerateData-gen.action",
			data: {"channelId" : channelId},
			success: function() {
				$.ligerDialog.alert("操作成功！");
				Koala.hideLoading();
			}
		});
 		return false;
	});
	
	Koala.ajax({
		url: "preprocess-GenerateData-loadChannels.action",
		dataType: "json",
		success: function(data) {
			if(data){
				var result = data.result;
				for(var i= 0; i < result.length; i++){
					$("#channelId").append("<option value='"+result[i].id+"'>"+result[i].name+"</option>");
				}
			}
		}
	});
});
</script>
</head>
<body>
		
<div class="searchtitle" style="width :1100px;">
	<div class="navbar"><div class="navbar-l"></div><div class="navbar-r"></div>
	        <div class="navbar-inner"> 
	        <b>生成测试用数据</b> 
	        </div>
	 </div>
	<table cellSpacing=0 cellPadding=0  border=0 class="form2column">
		<tr>
			<td class="label">请选择渠道：</td>
			<td class="">
				<select name="channelId" id="channelId">
					<option value="">--请选择--</option>
				</select>
			</td>
			<td class=""></td>
			<td class=""></td>
		</tr>
	
		
		<tr>
			 <td colspan="4"  style="text-align:center;height:35px;" >
	           <input type="button" value="生成" id="btn1" class="btn-normal"/>
	         </td>
		</tr>
	</table>
</div>
</body>
</html>